@echo off
echo Restoring database . . .
sqlcmd -S .\SQLEXPRESS -Q ^
    "RESTORE DATABASE [MvcEngine] FROM DISK = N'%~dp0\DB\MvcEngine.bak' WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10" ^
    -b -o con || GOTO ERROR

echo Success!!!

GOTO END

:ERROR
color C
echo    ------------------------------- ERROR !!!!! -------------------------------
:END

pause 